import { Component } from "react";
class App extends Component {
  constructor(props) {
    super(props);
    // this.changeA = this.changeA.bind(this);
  }
  state = {
    a: 10,
    b: 30,
  };
  changeA = () => {
    this.setState({
      a: 20,
    });
  };
  render() {
    return (
      <div>
        <div>This is App</div>
        <div>a:{this.state.a}</div>
        <div>b:{this.state.b}</div>
        <button onClick={this.changeA}>Click me!</button>
      </div>
    );
  }
}

export default App;
